package com.jp.knowledge.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.view.WindowManager;

import com.jp.knowledge.dialog.CommDialog;

public class DialogService extends Service {

    private CommDialog  commDialog;
    public DialogService() {
    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        throw new UnsupportedOperationException("Not yet implemented");
    }

    @Override
    public void onCreate() {
        super.onCreate();
        commDialog = new CommDialog(getApplicationContext());
        commDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);

    }

    public  void show(){

        commDialog.show();
    }

    public void dismiss(){
        commDialog.dismiss();
    }
}
